package com.usa.tool.model;

/**
 * 是1、否0
 *
 * @author bjliuyin
 */
public enum TrueFalseEnum {

    FALSE(0, "否"), TRUE(1, "是");
    private Integer value;
    private String text;

    private TrueFalseEnum(Integer value, String text) {
        this.value = value;
        this.text = text;
    }

    public static TrueFalseEnum getByValue(int value) {
        for (TrueFalseEnum em : TrueFalseEnum.values()) {
            if (em.getValue() == value) {
                return em;
            }
        }
        return null;
    }

    public Integer getValue() {
        return value;
    }

    public String getText() {
        return text;
    }
}
